<?php

class Application_Form_Admin_Admin extends Zend_Form
{

    public function init()
    {
          $this->setName('admin');//set the Form Name to Buyer
        /*Create Form Object buyerID
         * set filter = Must be an Integer
         */
          $buyerID=new Zend_Form_Element_Hidden('buyerID');
          $buyerID->addFilter('Int');

          /* Create Form Object Name => Buyer Name
           * Filter :
           * 1. cannot input HTML Tags
           * 2. delete spaces at the beginning and  the end of buyer's name
           */
          $username = new Zend_Form_Element_Text('username');
          $username->setRequired(true)
                ->addFilter('stripTags')
                ->addFilter('stringTrim')
                ->setAttrib('maxlength', '30')
                ->addErrorMessages(array('notEmpty'=>'Mohon Isi username'));

          $password = new Zend_Form_Element_Password('password');
          $password->setRequired(true)
                ->addFilter('stripTags')
                ->addFilter('stringTrim')
                ->setAttrib('maxlength', '30')
                ->addErrorMessages(array('notEmpty'=>'Mohon Isi password'));
                     $submit = new Zend_Form_Element_Submit('submit');
           $submit->setAttrib('id', 'submitBuyer');
           /*
            * Create Object Form Reset Button
            */
           $reset = new Zend_Form_Element_Reset('reset');
           $reset->setAttrib('id','resetBuyer');
           $this->addElements(array($username,$password,$submit,$reset));

    }


}

